home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d26 / freetk.arc / REFCARD.TXT < prev    next >
Text File  |  1987-06-16  |  43KB  |  1,118 lines

  1.  
  2.  
  3.                        TK SOLVER REFERENCE CARD  (Abridged)
  4.                      ========================================
  5.                 Copyright (c) 1986 Universal Technical Systems, Inc.
  6.  
  7.  
  8.         NOTE:  Items marked with (*) are available in TK Solver Plus
  9.                but not in FREETK.
  10.  
  11.         ---------------------------------------------------------------------
  12.  
  13.          FUNCTION KEYS
  14.  
  15.              F1    HELP              F2    CANCEL ENTRY
  16.              F3    LOAD FILE         F4    SAVE FILE
  17.              F5    EDIT              F6    ONE WINDOW
  18.          (*) F7    PLOT          (*) F8    TABLE
  19.              F9    SOLVE         (*) F10   LIST SOLVE
  20.  
  21.         ---------------------------------------------------------------------
  22.  
  23.          KEY TO SYMBOLS
  24.  
  25.            [xyz]      Key with xyz designation
  26.            [LEFT]     Left Arrow key
  27.            [RIGHT]    Right Arrow key
  28.            [UP]       Up Arrow key
  29.            [DOWN]     Down Arrow key
  30.            [BACKSP]   Backspace key
  31.            [TAB]      Tab key
  32.            [Enter]    Enter key
  33.  
  34.         ---------------------------------------------------------------------
  35.   
  36.          COMMANDS
  37.  
  38.         Navigation Commands
  39.              [UP]         Moves cursor up
  40.              [DOWN]       Moves cursor down
  41.              [LEFT]       Moves cursor left
  42.              [RIGHT]      Moves cursor right
  43.              [TAB]        Moves cursor to leftmost field
  44.              [Shift][TAB] Moves cursor to rightmost field
  45.              [Home]       Moves cursor to top of sheet
  46.              [End]        Moves cursor to end of sheet
  47.              [PgUp]       Scrolls cursor up N-2 lines
  48.                           Displays preceding page in the Help index
  49.              [PgDn]       Scrolls cursor down N-2 lines
  50.                           Displays next page in the Help index
  51.              Note: N is the number of lines in the current window
  52.  
  53.          (*) :        The Goto command moves cursor to specified row and
  54.                       column (e.g., :5s to go to 5th row of Status field).
  55.  
  56.              =        The Select command displays the specified sheet in
  57.                       current window:
  58.  
  59.  
  60.                                            1
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.                          V  Variable       (*) L  List
  70.                          R  Rule           (*) P  Plot
  71.                      (*) F  Function       (*) T  Table
  72.                          U  Unit           (*) N  Numeric Format
  73.                      (*) G  Global
  74.  
  75.              >     The Dive command:
  76.                       Brings up a relevant subsheet in the current window
  77.                       Brings up a subdirectory in Disk Index
  78.  
  79.              <     The Return command:
  80.                       Brings back original sheet or subsheet
  81.                       Brings back the parent directory in Disk Index
  82.  
  83.              ;     The Switch command moves cursor between windows
  84.  
  85.          Special Keys
  86.  
  87.            [Ins]         Inserts one row at current cursor position
  88.            [Ctrl-Break]  Cancels current command or entry
  89.  
  90.          Single-key commands
  91.  
  92.              !     The Action command
  93.                       Variable & Rule Sheets: Solves model (same as F9)
  94.                   (*) List Subsheet & List Function Subsheet: Fills in list
  95.                          values between first and last values
  96.                   (*) Plot Sheet & Plot Subsheet: Displays plot
  97.                   (*) Table Sheet & Table Subsheet: Produces table
  98.  
  99.            Ctrl-E  The Edit command calls the in-field editor (same as F5)
  100.  
  101.              ?    The Help command brings up on-line Help (same as F1)
  102.  
  103.          Slash Commands
  104.  
  105.            /W   Window command
  106.                    1  Unsplits the screen, displaying the current sheet
  107.                       in a single window (same as F6)           
  108.                 Other options split the screen, upper window retaining
  109.                       current sheet and lower window displaying:
  110.                    V  Variable Sheet      (*) L  List Sheet
  111.                    R  Rule Sheet          (*) P  Plot Sheet
  112.                (*) F  Function Sheet      (*) T  Table Sheet
  113.                    U  Unit Sheet          (*) N  Numeric Format Sheet
  114.                (*) G  Global Sheet
  115.  
  116.            /B   Blank command blanks specified range of fields in one column
  117.            /C   Copy command copies specified range of fields to specified
  118.                    destination
  119.            /D   Delete command deletes specified range of rows
  120.            /I   Insert command inserts blank rows at current row
  121.            /M   Move command moves specified range of rows to specified
  122.                    destination
  123.  
  124.  
  125.  
  126.                                            2
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.         (*) /L  List command acts on associated lists 
  136.                    L  List Solve
  137.                    B  Block Solve
  138.                    P  Put Element
  139.                    G  Get Element
  140.  
  141.            /S   Storage command
  142.                    L  Loads file with entire model or parts of model,
  143.                       appending contents onto current model (if any)
  144.                    S  Saves entire model
  145.                    V  Saves Variable Sheet and Variable Subsheets
  146.                       (*) saves specified range of rows when called from
  147.                           Variable Sheet
  148.                    U  Saves Unit Sheet
  149.                       (*) saves specified range of unit conversions when
  150.                           called from Unit Sheet
  151.                (*) F  Saves Function Sheet, Function Subsheets and related
  152.                       List Subsheets; saves specified range of Function
  153.                       Subsheets and related List Subsheets if called from
  154.                       Function Sheet
  155.                (*) N  Saves the Numeric Format Sheet and Numeric Format
  156.                       Subsheets; saves specified range of numeric formats if
  157.                       called from Numeric Format Sheet
  158.                (*) P  Saves the Plot Sheet and Plot Subsheets; saves
  159.                       specified range of plots if called from Plot Sheet
  160.                (*) T  Saves the Table Sheet and Table Subsheets; saves
  161.                       specified range of tables if called from Table Sheet
  162.                (*) C  Saves configuration file under TK.CFG
  163.                (*) #  DIF storage: saves and loads files in DIF format
  164.                (*) A  ASCII storage: saves and loads data in ASCII format
  165.                (*) W  WKS storage: saves and loads files in Lotus 1-2-3 (R)
  166.                           format
  167.                    Note: #, A and W offer specific options:
  168.                             S  Saves data from List Subsheets; saves speci-
  169.                                fied range of lists if called from List Sheet
  170.                             L  Loads data into lists
  171.  
  172.            /P   Print command prints specified range of rows from a sheet
  173.  
  174.            /E   eXamine command
  175.                    V  opens the Prompt/Error line for specifying a variable
  176.                       whose value will be displayed
  177.                    E  opens the Prompt/Error line for typing in an expression
  178.                       to be evaluated
  179.                    C  copies the contents of a field under the cursor to the
  180.                       Prompt/Error line (to be edited into an expression and
  181.                       evaluated)
  182.  
  183.            /R   Reset command resets specified portions of TK (must be
  184.                 confirmed)
  185.                    V  Resets variable values
  186.                    S  Resets current sheet
  187.                    A  Resets all sheets
  188.  
  189.  
  190.  
  191.  
  192.                                            3
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.            /Q   Quit command quits TK (must be confirmed)
  203.  
  204.         ---------------------------------------------------------------------
  205.  
  206.          THE IN-FIELD EDITOR
  207.            is entered at the current cursor position 
  208.                - by pressing F5
  209.                - automatically when attempted entry is found in error         
  210.            [Right]       Moves cursor right for one space
  211.            [Left]        Moves cursor left for one space
  212.            [TAB]         Moves cursor right to the next right tab position
  213.            [Shift][TAB]  Moves cursor left to the next left tab position
  214.            [UP], [PgUp] or [Home]    Moves cue to beginning of line
  215.            [Down], [PgDn] or [End]   Moves cue to end of line
  216.            [Del]         Deletes a character to right of cue
  217.            [BACKSP]      Deletes character to left of cue
  218.            F2            Exits editor, restores previous field contents
  219.            [ENTER]       Enters the edited field contents, exits editor
  220.  
  221.  
  222.          ENTERING INFORMATION 
  223.  
  224.         To enter information into a field, type it in and press [Enter] or a
  225.         navigation key (i.e. [UP], [DOWN], [RIGHT], [Home], [PgUp] etc).  The
  226.         navigation keys move the cursor following a successful entry.  If the
  227.         entry is invalid for the current field, the in-field editor will be
  228.         invoked.  The cue moves to the suspected problem spot and an error
  229.         message appears in the Prompt/Error line.
  230.  
  231.         Entries must conform to the following TK syntax conventions:
  232.  
  233.          TK Names
  234.            Variable names, list names and function names:
  235.              - can be up to 200 characters long
  236.              - can consist of letters (including international letters, ASCII
  237.                values 128-154 and 160-165; Greek letters, ASCII values
  238.                224-238), digits, and special characters @ # $ % _
  239.              - cannot begin with a digit or contain blanks
  240.              - are case-sensitive, i.e. RESULT, Result, and result are all
  241.                different names (except that names of built-in functions or
  242.                special words, such as IF or THEN, are not case-sensitive)
  243.              - must be unique within a Name field of a sheet
  244.            Examples:   VAR     x     days_week     x$a     c2@lib
  245.  
  246.          Numeric values or constants:
  247.            numbers with an absolute value between 1E-307 and 1E308, or 0
  248.            Examples:    +2.3      .7          -83       1E7
  249.                         3.        14159       -5.3E-2
  250.  
  251.          Symbolic values or constants:
  252.            any TK name preceded by an apostrophe
  253.            Examples:     'abc      'CATS      'dogs      'a_z
  254.  
  255.  
  256.  
  257.  
  258.                                            4
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.          Expressions:
  268.            numeric constants, symbolic constants, variable names, function
  269.            references, list elements, arithmetic expressions, relational
  270.            expressions, logical expressions and complex numbers.
  271.            Examples:      1987      'pet      profit     sin(x)
  272.                        (*)'a[3]     A > B     NOT(bad)   (z,jz)
  273.  
  274.            Arithmetic expressions
  275.              an arithmetic expression can be any expression preceded by unary
  276.              + or -, or two expressions linked by an arithmetic operator (+ -
  277.              * / ^).  The constituent expressions (operands) must evaluate
  278.              into numeric values.
  279.              arithmetic operators are (in order of precedence):
  280.                 Exponentiation                ^
  281.                 Unary plus and minus          +  -
  282.                 Multiplication and Division   *  /
  283.                 Addition and Subtraction      +  -
  284.              Examples:   -5    t^2    sin(x)/x   4^2^3 (evaluates into 65536)
  285.              Note: Operations at the same precedence level are performed
  286.                    from left to right except for series of exponentiations,
  287.                    which are performed from right to left (see example).
  288.                    The order of operations may be controlled by parentheses.
  289.              
  290.            Relational expressions
  291.              a relational expression has a numerical value 1 (true) or 0
  292.              (false), and has the form two expressions linked by a
  293.              relational operator.
  294.              relational operators are:
  295.                 Equal                    =
  296.                 Greater Than             >
  297.                 Greater Than or Equal    >=   or   =>
  298.                 Less Than                <
  299.                 Less Than or Equal       <=   or   =<
  300.                 Not Equal                <>   or   ><
  301.              Examples:     A >= B     alpha = 90     animal <> 'dog
  302.                 Note: Relational operators have lower order of precedence
  303.                       than arithmetic operators; e.g. 5+6<4*3, (5+6<4)*3 
  304.                       and 5+(6<4)*3 evaluates respectively to 1, 0 and 5
  305.  
  306.            Logical expressions
  307.              a logical expression can be a relational expression, a Boolean
  308.              function, or any other expression that evaluates into 1 (true)
  309.              or 0 (false)
  310.              Examples:   revenue>cost    AND(big,fat)    abs(sgn(x))
  311.  
  312.            Complex expressions
  313.              a complex expression can be a pair of numeric expressions
  314.              representing a complex number, an arithmetic operation on
  315.              complex numbers, or a function that evaluates into a pair of
  316.              numeric values.
  317.              Examples:   (3,4)   (R,w*L-1/w*C)   (a,b)*(c,d)   POWER((e,f),n) 
  318.                 Note: (x,y) is TK representation of the complex number
  319.                       x + i*y , where  i  is square root of -1
  320.  
  321.  
  322.  
  323.  
  324.                                            5
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.          Rules:
  334.            Unconditional rules have the form 
  335.              expression = expression
  336.            Examples:  area = pi()*R^2     a + b = c*d  
  337.                       x^2 + y^2 = z^2     flag = b^2 > 4*a*c
  338.                       (p,q)+(u,v) = rcis(R,phi)
  339.            Conditional rules have the forms
  340.              IF logical expression THEN unconditional rule
  341.              (*) IF logical expr. THEN uncond. rule ELSE uncond. rule
  342.            Examples:   if shape='square then area=side^2 else area=pi()*r^2
  343.                        x = a = b   (same as: if a=b then x=1 else x=0)
  344.  
  345.         (*) List Elements:
  346.              Reference to a list element may have the form:
  347.                            listname[expression]
  348.              Examples:  'list_a[34]     x[num] (when e.g. x='abc and num=6)
  349.              Note: ELEMENT function may be used for referencing a list
  350.                    element in a rule or in the right hand side of a 
  351.                    statement; PLACE function must be used for directing
  352.                    a value into a list element from a rule, and it may be 
  353.                    used for the same purpose in the left hand side of a 
  354.                    statement.
  355.  
  356.         (*) Statements:
  357.              Unconditional statements include assignment statements,
  358.              branching statements, call statements and return statements.
  359.              Conditional Statements are of the form IF-THEN-ELSE
  360.              Loop Constructs are of the form FOR-TO-STEP-NEXT
  361.              Examples:   a:=a+1
  362.                          GOTO first_line
  363.                          CALL DELETE('x)
  364.                          IF x=y THEN CALL Sum(a,b,c)
  365.                          FOR i:=1 TO length('R)
  366.                             RP:=RP+1/'R[i]
  367.                          NEXT i
  368.  
  369.          Character strings:
  370.            Any combination of characters available from the keyboard
  371.            (including blanks) or most of the 254 IBM characters that can be
  372.            be entered by holding down Alt key and typing appropriate ASCII
  373.            value on the numeric keypad.  Question marks, if needed, must be
  374.            typed as Ctrl-Q, because typing ? invokes on-line Help.
  375.            
  376.          Units:
  377.            Unit names must be character strings.
  378.  
  379.          Comments:
  380.            Comments must be character strings.
  381.  
  382.         (*) Numeric Formats:
  383.            Numeric Format names must be character strings.  The "no name" or
  384.            blank Numeric Format field implies the default format setting.
  385.  
  386.         Some fields accept only one of a set of options and do not require
  387.         [Enter].  The options are listed with the sheet descriptions.
  388.  
  389.  
  390.                                            6
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.         Some fields are used only to display results.
  400.  
  401.         ---------------------------------------------------------------------
  402.  
  403.          THE SOLVERS
  404.  
  405.         TK uses two solving techniques, the Direct Solver and the Iterative
  406.         Solver.
  407.  
  408.          The Direct Solver:
  409.              Solving one equation with the Direct Solver is possible if the
  410.              following conditions are met:
  411.              1. The unknown variable appears only once
  412.              2. The unknown variable is not an argument of a non-invertible
  413.                 function
  414.              Examples:
  415.                 sin(x*y) = z^2          can be resolved for either x, y or z
  416.                 sin(x*y) = x + z        can be resolved for y or z but not
  417.                                         for x
  418.                 y * abs(x) = mod(z,2)   can be resolved for y, but not for x
  419.                                         or z
  420.  
  421.              Solving a set of equations with the Direct Solver:
  422.              The Direct Solver solves a set of n equations for n unknowns if
  423.              the above conditions are satisfied for each of them and it can
  424.              solve one equation after another.  The solution process is
  425.              facilitated by the fact that the Direct Solver automatically
  426.              substitutes newly evaluated variable in all remaining equations.
  427.  
  428.          The Iterative Solver
  429.              If the above conditions are not fulfilled, you have to assign a
  430.              guess value to one or more unknown variables.  The guesses
  431.              temporarily play the role of input values so that the Direct
  432.              Solver can proceed.  These additional inputs make some equations
  433.              overdefined (i.e. they generate errors internally).  The 
  434.              Iterative Solver manipulates the guess values until the error
  435.              terms fall below the Comparison Tolerance.
  436.  
  437.         ---------------------------------------------------------------------
  438.  
  439.          DISK INDEX
  440.  
  441.         The Disk Index lists all files that have an extension appropriate
  442.          to the chosen storage command option, and belong to the specified
  443.          directory or subdirectory .
  444.  
  445.          To Access the Disk Index:
  446.  
  447.         *  Press F3 to load a file, F4 to save a file, or type /S and any
  448.            option character.  (If you select option /S#, /SW or /SA, you must
  449.            type an extra character to specify Save or Load.)
  450.         *  At this point you may type a drive designator and/or a path
  451.            specification and/or wildcards, or none of these.
  452.         *  Press [Enter] to display the Disk Index.
  453.  
  454.         ---------------------------------------------------------------------
  455.  
  456.                                            7
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.          UNIT CONVERSIONS
  466.  
  467.         To convert values between units of measurement, the conversions must
  468.         be defined on the Unit Sheet.  Conversions may be chained, e.g., if
  469.         conversions are defined between meters and feet, and between meters
  470.         and centimeters, then TK will perform conversions between feet and
  471.         centimeters.
  472.  
  473.         ---------------------------------------------------------------------
  474.  
  475.         (*) NUMERIC FORMATS
  476.  
  477.         The Numeric Format Sheet allows you to define the appearance of your
  478.         numeric values.  You can define many different numeric formats and
  479.         assign different formats to different variables and/or lists.
  480.  
  481.         ---------------------------------------------------------------------
  482.  
  483.          FUNCTIONS
  484.  
  485.         Two main categories of functions in TK are:
  486.                 Built-in functions
  487.             (*) User-defined functions
  488.  
  489.         There are three classes of user-defined functions:
  490.            Rule functions (i.e. "back-solvable submodels")
  491.            Procedure functions (i.e. sequential programs)
  492.            List functions (i.e. function represented by two lists of values.)
  493.              Four kinds of mappings are available in list functions:
  494.                 Table lookup
  495.                 Step mapping
  496.                 Linear interpolation
  497.                 Cubic interpolation
  498.  
  499.         There are two ways of invoking a function:
  500.              referring to the function in an expressions, e.g.
  501.                    a + b = log(x)/c
  502.                 where the function reference plays the role of an expression
  503.              calling the function, e.g.
  504.                    call linsolve(a,b;x)
  505.                 where the function call stands as a rule (in the Rule Sheet
  506.                 or in a Rule Function Subsheet) or a statement (in a
  507.                 Procedure Function Subsheet).
  508.  
  509.         Although specified throughout this reference card in uppercase,
  510.         built-in function names are not case sensitive.  For example, COS(x)
  511.         = Cos(x) = cos(x).
  512.  
  513.          SUMMARY OF TK BUILT-IN FUNCTIONS
  514.  
  515.          Mathematical Constants
  516.  
  517.            PI()    ...  3.141592653589793    pi (ratio of circumference to
  518.                                              diameter)
  519.            E()     ...  2.718281828459045    e (base of natural logarithms)
  520.  
  521.  
  522.                                            8
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.          Trigonometric and Inverse Trigonometric Functions
  532.  
  533.            With Arguments/Function Values in Radians
  534.  
  535.            SIN(x)           Sine of x
  536.            ASIN(x)          Arc sine of x
  537.            COS(x)           Cosine of x
  538.            ACOS(x)          Arc cosine of x
  539.            TAN(x)           Tangent of x
  540.            ATAN(x)          2-quadrant arc tangent of x
  541.            ATAN2(y,x)       4-quadrant arc tangent of y/x
  542.  
  543.            With Arguments/Function Values in Degrees
  544.  
  545.            SIND(x)          Sine of x
  546.            ASIND(x)         Arc sine of x
  547.            COSD(x)          Cosine of x
  548.            ACOSD(x)         Arc cosine of x
  549.            TAND(x)          Tangent of x
  550.            ATAND(x)         2-quadrant arc tangent of x
  551.            ATAN2D(y,x)      4-quadrant arc tangent of y/x
  552.  
  553.          Exponential and Logarithmic Functions
  554.  
  555.            EXP(x)     Number e, 2.718281828459045, raised to the xth power
  556.            LN(x)      Natural (base e) logarithm of x
  557.            LOG(x)     Common (base 10) logarithm of x
  558.  
  559.          Hyperbolic and Inverse Hyperbolic Functions
  560.  
  561.            SINH(x)       Hyperbolic sine of x
  562.            ASINH(x)      Hyperbolic arc sine of x
  563.            COSH(x)       Hyperbolic cosine of x
  564.            ACOSH(x)      Hyperbolic arc cosine of x
  565.            TANH(x)       Hyperbolic tangent of x
  566.            ATANH(x)      Hyperbolic arc tangent of x
  567.  
  568.          Other Invertible Mathematical Functions
  569.  
  570.            SQRT(x)          Positive square root of x
  571.            ROOT(x,n)        Root function, nth root of x
  572.            ERF(x)           Error function (associated with normal
  573.                             distribution curve)
  574.            GAMMA(x)         Gamma function, x-1 factorial for integer x>0
  575.  
  576.          Non-Invertible Mathematical Functions
  577.  
  578.            SGN(x)           Sign (-1, +1 or 0) of x
  579.            ABS(x)           Absolute value of x
  580.            INT(x)           Integer part of x
  581.         (*) INTEGER(x)      Same as INT
  582.            ROUND(x)         Nearest integer to x (even rounding)
  583.            ROUND(x,y)       Value of x even-rounded to the nearest multiple
  584.                             of y
  585.  
  586.  
  587.  
  588.                                            9
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.            CEILING(x)       Smallest integer value greater than or equal to
  598.                             the value of x
  599.            FLOOR(x)         Largest integer value less than or equal to the
  600.                             value of x
  601.            MOD(x,y)         Remainder of x/y
  602.         (*) MODULUS(x,y)    Same as MOD
  603.            DIVIDE(x,y)      Returns two values:  int(x/y)  and  mod(x,y)
  604.            STEP(x,y)        Returns  1 if x >= y
  605.                                      0 if x < y
  606.  
  607.          Complex Functions
  608.  
  609.            POWER((x,y),n)
  610.                 Calculates the complex number equal to the complex number
  611.                 (x,y) raised to the nth power 
  612.            RCIS(x,y)
  613.                 Calculates a complex number in rectangular form equivalent
  614.                 to the complex number in polar form where x is the radius and
  615.                 y is the angle in radians
  616.            RCISD(x,y)
  617.                 same as RCIS except y is in degrees
  618.  
  619.          Boolean Functions
  620.  
  621.            NOT(x)                 Boolean NOT
  622.            AND(x1,x2,x3,...)      Boolean AND
  623.            OR(x1,x2,x3,...)       Boolean OR
  624.            EQV(x,y)               1 (true) if x and y are the same (both 0
  625.                                   or both 1), otherwise 0 (false)
  626.            IMPLY(x,y)             0 (false) if x is 1 (true) and x is 0
  627.                                   (false), otherwise 1 (true)
  628.  
  629.          List and Multi-Argument Functions
  630.  
  631.              MAX(x1,x2,x3,...)    maximum value among the arguments
  632.              MIN(x1,x2,x3,...)    minimum value among the arguments
  633.              SUM(x1,x2,x3,...)    sum of the arguments
  634.          (*) COUNT(listname)      number of non-blank elements in list
  635.          (*) LENGTH(listname)     number of elements in list including blanks
  636.                                   (i.e. length of the list)
  637.              NPV(r,x1,x2,x3,...)
  638.                 net present value of a series x1,x2,x3,... of cashflow 
  639.                 values at the interest rate r
  640.         (*)  DOT(listname,x1,x2,x3,...)
  641.                 dot product of the list elements with the series of arguments
  642.              POLY(x,x1,x2,x3,...)
  643.                 value of the polynomial at x with x1,x2,x3,... coefficients
  644.                 starting with the highest order
  645.          (*) CHECK(listname)      1 if list listname exists
  646.                                   0 if it does not exist
  647.          (*) LISTCOPY(x,y) 
  648.                 copies elements of list x into list y
  649.          (*) LISTCOPY(x,y,i)
  650.                 copies list x starting from ith element to list y
  651.  
  652.  
  653.  
  654.                                           10
  655.  
  656.  
  657.  
  658.  
  659.  
  660.  
  661.  
  662.  
  663.          (*) LISTCOPY(x,y,i,j)
  664.                 copies ith through jth elements of list x to list y
  665.          (*) LISTCOPY(x,y,i,j,k) 
  666.                 copies ith through jth elements of list x to list y,
  667.                 starting at the kth element of list y
  668.          (*) MEMBER(x,x1,x2,x3,...)
  669.                 1 if value of x is among x1,x2,x3,..., otherwise 0
  670.          (*) BLANK(listname)
  671.                 blanks specified list
  672.          (*) BLANK(listname,i)
  673.                 blanks the ith element in specified list
  674.          (*) DELETE(listname)
  675.                 deletes a list from the List Sheet
  676.  
  677.         NOTE: Arguments x1,x2,x3,... may be replaced by a listname in full
  678.               TK Solver supporting the list feature.
  679.  
  680.          TK-Specific Functions
  681.  
  682.          (*) ELEMENT   - same as ELT
  683.          (*) ELT()
  684.                 returns the element number of current instance during 
  685.                 list solving or block solving
  686.          (*) ELT(listname,n)
  687.                 returns the value of the nth element of the list
  688.          (*) ELT(listname,n,expr) 
  689.                 returns the value of the nth element of the list, or,
  690.                 if blank, the expression expr
  691.          (*) PLACE(listname,n)
  692.                 places a value into the nth element of the list listname
  693.          (*) APPLY(functname,x1,x2,x3 ...)
  694.                 returns the value of the specified function with given 
  695.                 arguments; Example: if fun='SIND then APPLY(fun,90) returns 1 
  696.              VALUE(varname)
  697.                 returns the value of the specified variable
  698.                 Example: if key='phi and phi=15 then VALUE(key) returns 15 
  699.  
  700.            Status Functions, short form
  701.  
  702.              GIVEN(varname)
  703.                 returns 1 or 0 if the specified variable is or is not 
  704.                 assigned an input value
  705.              EVLTD(varname)
  706.                 returns 1 if the specified variable was evaluated during 
  707.                 current run of the Direct Solver
  708.              KNOWN(varname)
  709.                 returns 1 if the specified variable is assigned an input 
  710.                 value or was evaluated during current run of the Direct 
  711.                 Solver
  712.              EXAMPLE: IF KNOWN('phi) THEN L=phi*rho (i.e. L=phi*rho rule
  713.                       applies if the variable phi is known)
  714.  
  715.  
  716.  
  717.  
  718.  
  719.  
  720.                                           11
  721.  
  722.  
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729.            Status Functions, long form:
  730.  
  731.              GIVEN(varname1,varname2,...,expr1,expr2)
  732.                 returns expr1 if all the specified variables are assigned
  733.                 input values; else, it returns expr2
  734.              KNOWN(varname1,varname2,...,expr1,expr2)
  735.                 returns expr1 if all the specified variables are given or
  736.                 evaluated; else, it returns expr2 
  737.              EVLTD(varname1,varname2,...,expr1,expr2)
  738.                 returns expr1 if all the specified variables were evaluated
  739.                 during current run of the Direct Solver; else it returns
  740.                 expr2
  741.              EXAMPLES:
  742.              1. Rate = GIVEN('Rate,Rate,10) (i.e. if Rate is assigned an
  743.                 input value, the rule represents trivial identity Rate=Rate;
  744.                 else the rule assigns a default value Rate=10)
  745.              2. L = KNOWN('phi,phi*rho,0/0) (if phi is known, the rule beco-
  746.                 mes L=phi*ro; if phi is not known, the rule is ignored) 
  747.                 in the previous paragraph)
  748.              3. if GIVEN('phi,'alpha,'beta,1,0) then L= phi*R (i.e. the rule
  749.                 applies only if all 'phi,'alpha,'beta are given)
  750.  
  751.         ---------------------------------------------------------------------
  752.  
  753.          SHEETS
  754.  
  755.          VARIABLE SHEET
  756.  
  757.         Selected by pressing =V
  758.  
  759.         Status
  760.              accepts:    I  puts value into Input field
  761.                          O  puts value into Output field
  762.                      (*) L  associates or dissociates a list with variable
  763.                          G  sets or unsets value as guess for iteration
  764.                          B  blanks value and unsets guess (if set)
  765.  
  766.              displays:   >  indicates error condition (move cursor over the
  767.                             mark to see more information on the Status Line
  768.                          L  indicates a list association
  769.                          G  indicates a guess status
  770.         Input
  771.              input value
  772.         Name
  773.              variable name
  774.         Output
  775.              output value
  776.         Unit
  777.              first entry in blank field sets both calculation unit display
  778.              unit; subsequent entries change only display unit
  779.         Comment
  780.              comments and reminders; not used for solution
  781.  
  782.          VARIABLE SUBSHEET
  783.         accessed from the Variable Sheet by the Dive command  > , gives      
  784.  
  785.  
  786.                                           12
  787.  
  788.  
  789.  
  790.  
  791.  
  792.  
  793.  
  794.  
  795.         more detailed information about a particular variable.
  796.  
  797.         Status
  798.              reflects the Status field on the Variable Sheet.
  799.         First Guess
  800.              value to use as first guess for automatic iteration
  801.         (*) Associated List
  802.              name of the list of values associated with the variable
  803.         Input Value  and  Output Value
  804.              these fields show the same values as in the Variable Sheet
  805.         (*) Numeric Format
  806.              controls the appearance of an input, output or guess value
  807.              displayed on the Variable Sheet or the Variable Subsheet
  808.         Display Unit
  809.              unit name entered or displayed here is the same as the one in
  810.              the Unit field of the Variable Sheet; any entry or change made
  811.              in either location is reflected in the other
  812.         Calculation Unit
  813.              unit used in calculations
  814.         Comment
  815.              the same as in the Variable Sheet
  816.  
  817.  
  818.          RULE SHEET
  819.  
  820.         Selected by pressing =R
  821.  
  822.         Status
  823.              accepts:    C  cancels and uncancels the rule
  824.  
  825.              displays:   C  indicates the rule out of operation
  826.                          *  unsatisfied, indicates unsolved equation
  827.                          >  indicates error (move cursor over the mark to see
  828.                             more information in the Status line)
  829.                      blank  the equation was solved during the last run of 
  830.                             the solvers
  831.         Rule
  832.              unconditional or conditional rule and/or comment (comment must
  833.              be preceded by a quotation mark and is ignored by the solvers)
  834.  
  835.          UNIT SHEET
  836.  
  837.         Selected by pressing =U
  838.  
  839.         Contains definitions of conversions between units of measurement.
  840.  
  841.         From
  842.              unit converted from
  843.         To
  844.              unit converted to
  845.         Multiply By
  846.              conversion factor
  847.         Add Offset
  848.              a value to be added in order to align scales (e.g. 32 in
  849.              converting from Celsius to Fahrenheit); blank for zero offset
  850.  
  851.  
  852.                                           13
  853.  
  854.  
  855.  
  856.  
  857.  
  858.  
  859.  
  860.  
  861.         (*) GLOBAL SHEET
  862.  
  863.         Selected by pressing =G
  864.  
  865.         Contains global settings and program defaults
  866.  
  867.         Field                        Options                          Default
  868.  
  869.         Display Intermediate Values  Y N                              Y
  870.         Stop on List Error           Y N                              N
  871.         Use Automatic Iteration      Y N                              Y
  872.         Comparison Tolerance         any real number >= 0             .000001
  873.         Typical Value                any real number >= 0             1
  874.         Maximum Iteration Count      any integer 1 < n < 10,000       10
  875.         Global Numeric Format        any defined Numeric Format name  (BLANK)
  876.         Append Variable Names        Y N                              Y
  877.         Use Page Breaks              Y N                              Y
  878.         Number Pages                 Y N                              Y
  879.         Form Length                  any integer 6 < n < 1000         66
  880.         Printed Page Length          any integer 6 < n < 1000         60
  881.         Printed Page Width           any integer 6 < n < 200          80
  882.         Left Margin                  any integer 6 < n < 200          0
  883.         Printer Device or Filename   any valid filename or device name   LPT1
  884.         Printer Setup String         any valid setup string           (BLANK)
  885.         Use Color                    Y N                              Y
  886.         Slow Redisplay               Y N                              Y
  887.         Solid Line Headings          Y N                              Y
  888.         Bottom Prompt Line           Y N                              Y
  889.  
  890.         Note: All the defaults are fixed in FREETK.  The last four parameters
  891.               may be set up in the optional FREETG.CFG file.
  892.  
  893.  
  894.         (*) LIST SHEET
  895.  
  896.         Selected by pressing =L
  897.  
  898.         Contains a summary of all lists
  899.  
  900.         Note: Detailed information about the List Sheet is omitted here as 
  901.               irrelevant to FREETK.
  902.  
  903.  
  904.         (*) LIST SUBSHEET
  905.  
  906.         Accessed by diving (>) from the List Sheet, Variable Subsheet, List
  907.         Function Subsheet, Plot Subsheet or Interactive Table.
  908.  
  909.         Holds the values of the list elements and specific information about
  910.         the lists.        
  911.  
  912.         Note: Detailed information about the List Subsheet is omitted here
  913.               as irrelevant to FREETK.
  914.  
  915.  
  916.  
  917.  
  918.                                           14
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.         (*) FUNCTION SHEET
  928.  
  929.         Selected by pressing =F
  930.  
  931.         Contains a summary of all functions defined by the user.
  932.  
  933.         Note: Detailed information about the Function Sheet is omitted
  934.               here as irrelevant to FREETK.
  935.  
  936.  
  937.         (*) LIST FUNCTION SUBSHEET
  938.  
  939.         Accessed by diving (>) from the Function Sheet or from any place
  940.         of reference (rule, statement) to a particular function.
  941.  
  942.         Contains the lists with the function and argument values, and
  943.         serves for setting the function Mapping Options:
  944.              T Table mapping
  945.              S Step mapping
  946.              L Linear interpolation
  947.              C Cubic interpolation
  948.  
  949.         Note: Detailed information about the List Function Subsheet is
  950.               omitted here as irrelevant to FREETK.
  951.  
  952.  
  953.         (*) RULE FUNCTION SUBSHEET
  954.  
  955.         Accessed by diving (>) from the Function Sheet or from any place
  956.         of reference (rule, statement) to a particular function.
  957.  
  958.         Contains the slate of Parameter, Argument and Result variables, and
  959.         the rules constituting the body of the function.
  960.  
  961.         Note: Detailed information about the Rule Function Subsheet is
  962.               omitted as irrelevant to FREETK.
  963.  
  964.  
  965.         (*) PROCEDURE FUNCTION SUBSHEET
  966.  
  967.         Accessed by diving (>) from the Function Sheet or from any place
  968.         of reference (rule, statement) to a particular function.
  969.  
  970.         Contains the slate of Parameter, Input and Output variables, and
  971.         the statements constituting the body of the function.
  972.  
  973.         Note: Detailed information about the Procedure Function Subsheet is
  974.               omitted as irrelevant to FREETK.
  975.  
  976.  
  977.         (*) PLOT SHEET
  978.  
  979.         Selected by pressing =P
  980.  
  981.  
  982.  
  983.  
  984.                                           15
  985.  
  986.  
  987.  
  988.  
  989.  
  990.  
  991.  
  992.  
  993.         Contains names and titles of all plots (multiple plot definitions
  994.         are allowed in a model).
  995.  
  996.  
  997.         (*) PLOT SUBSHEET
  998.  
  999.         Accessed by diving (>) from the Plot Sheet.
  1000.  
  1001.         Serves for specifying the lists to be plotted and for setting up      
  1002.         options.  The Plot Type options are Line chart, Bar chart and Pie
  1003.         chart.  The Display Mode options are CGA, Hercules and EGA mode.
  1004.  
  1005.         Note: Detailed information about the Plot Subsheet is omitted here
  1006.               as irrelevant to FREETK.
  1007.  
  1008.  
  1009.         (*) TABLE SHEET
  1010.  
  1011.         Selected by pressing =T
  1012.  
  1013.         Contains names and titles of all tables (multiple table definitions
  1014.         are allowed in a model).
  1015.  
  1016.  
  1017.         (*) TABLE SUBSHEET
  1018.  
  1019.         Accessed by diving (>) from the Table Sheet
  1020.  
  1021.         Serves for specifying the lists to be tabulated and for setting up
  1022.         options. The options are Interactive Table and Output Table.
  1023.  
  1024.         Note: Detailed information about the Plot Subsheet is omitted here 
  1025.               as irrelevant to FREETK.
  1026.  
  1027.  
  1028.         (*) NUMERIC FORMAT SHEET
  1029.  
  1030.         Selected by pressing =N
  1031.  
  1032.         Contains the names of numeric formats used to control individually
  1033.         the appearance of variable and list values, displayed or printed.
  1034.  
  1035.         Note: Detailed information about the Numeric Format Sheet is omitted 
  1036.               as irrelevant to FREETK.
  1037.  
  1038.  
  1039.         (*) NUMERIC FORMAT SUBSHEET
  1040.  
  1041.         Accessed by diving (>) from the Numeric Format Sheet or from the 
  1042.         Numeric Format field in the Variable Sheet, Variable Subsheet, List
  1043.         Sheet, List Subsheet or Table Subsheet.
  1044.  
  1045.         Note: FREETK uses the default numeric format.  The following
  1046.               information gives the default settings and shows the scope
  1047.  
  1048.  
  1049.  
  1050.                                           16
  1051.  
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.               of numeric formatting capability in TK Solver Plus.  
  1060.  
  1061.         Numeric Notation
  1062.              S  Scientific notation
  1063.              D  Decimal notation
  1064.              E  Either scientific or decimal notation (default); in this case
  1065.                 TK choses for every value displayed a notation giving the
  1066.                 maximum number of significant digits within the field
  1067.         Significant Digits
  1068.              can be any integer between 1 and 20 (default is 15 and TK's 
  1069.              arithmetic limit is 16); when the field holding a numeric value 
  1070.              is covered by the cursor, the value in full precision shows up
  1071.              on the screen in the 1st or Status line 
  1072.         Decimal Places
  1073.              can be any integer between 1 and 200; the default is blank,
  1074.              which means displaying as many digits to the right of the
  1075.              decimal point as will fit the width of the field and the
  1076.              Significant Digits setting     
  1077.         Padding
  1078.              fills the spaces from the last significant digit through the
  1079.              number of decimal places specified in the Decimal Places field.
  1080.              The padding character options are Zero, Blanks or None (default)
  1081.         Decimal Point Symbol
  1082.              any character which is neither a digit nor a letter can be
  1083.              specified; default is period
  1084.         Digit Grouping Symbol
  1085.              separates numeric values into three-digit groupings to the left
  1086.              of the decimal point;  default is a blank field, which disables
  1087.              digit grouping  
  1088.         Zero Representation
  1089.              a zero value can be represented by one or more characters which
  1090.              may include letters, blank spaces and digits; default is 0
  1091.         +/- Notation
  1092.              -    - only (default)
  1093.              +    + and -
  1094.              (    negative values enclosed in ()
  1095.         Prefix
  1096.              is one or more characters, such as a dollar sign, which are
  1097.              displayed before each numeric value; default is no prefix
  1098.         Suffix
  1099.              is one or more characters, such as a percent sign, which are
  1100.              displayed following each numeric value; default is no suffix
  1101.         Justification
  1102.              options of Left (default), Right and Centered determine whether
  1103.              values will be displayed aligned to the left side, to the right
  1104.              side or in the center of a field
  1105.         Left Margin Width
  1106.              is the number of blank spaces in the left margin of the field;
  1107.              may be any integer from 0 (default) to 200; a prefix and/or a
  1108.              sign may appear in the margin
  1109.         Right Margin Width
  1110.              is the number of blank spaces in the right margin of the field;
  1111.              may be any integer from 0 (default) to 200; a suffix may appear
  1112.              in the margin
  1113.  
  1114.  
  1115.  
  1116.                                           17
  1117.  
  1118.